<template>
	<view class="detail">
		<uni-card>
			<view>处理结果:{{detail.status === 0 ? '处理中':'已处理'}}</view>
			<view>反馈类型:{{detail.feedbackTypeName}}</view>
			<view>具体详情:{{detail.detailCause}}</view>
			<view class="item" v-for="item in detail.feedbackProgressesList" :key="item.feedbackProgressId">
				<view>时间：{{item.createTime}}</view>
				<view>处理状态：{{item.title}}</view>
			</view>
		</uni-card>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		ref
	} from 'vue'
	import {
		getFallbackDetail
	} from '@/service/modules/personal';

	const detail = ref({})

	onLoad((options) => {
		getDetail(options.id)
	})

	const getDetail = async (id) => {
		const res = await getFallbackDetail(id)
		detail.value = res.data[0]
		console.log(res);
	}
</script>

<style lang="scss">
	.item {
		border: 2rpx solid $second-primary-color;
		margin: 20rpx 0;
		padding: 10rpx 20rpx;
		border-radius: 20rpx;
		color: $text-color;
		font-size: 26rpx;
	}
</style>